package org.example.cake.service.impl;

import org.example.cake.entity.Paycakeid;
import org.example.cake.mapper.PaycakeidMapper;
import org.example.cake.service.PaycakeidSercice;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class PaycakeidSerciceImpl implements PaycakeidSercice {
    @Autowired
    private PaycakeidMapper paycakeidMapper;
    /**
     * 把订单里的蛋糕添加到这个表中
     * @Date 2025-08-01 谭丽娜
     * @param paycakeid
     * @return
     */
    @Override
    public Integer insertAddcakeid(Paycakeid paycakeid) {
        return paycakeidMapper.insertAddcakeid(paycakeid);
    }

    @Override
    public Integer selectpaycount(Paycakeid paycakeid) {
        return paycakeidMapper.selectpaycount(paycakeid);
    }
    /**
     * 获取蛋糕id
     * @Date 2025-08-04 谭丽那
     * @param payid
     * @return
     */
    @Override
    public List<Integer> selectByckaeid(Integer payid) {
        return paycakeidMapper.selectByckaeid(payid);
    }
    /**
     * 根据payid查询蛋糕总数
     * @param payid
     * @return
     */
    @Override
    public Integer getcakecount(Integer payid) {
        return paycakeidMapper.getcakecount(payid);
    }
}
